<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFinancesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('finances', function (Blueprint $table) {
            $table->id();
            $table->string('order_sn')->nullable()->comment('订单编号');
            $table->string('phone')->nullable()->comment('顾客手机号');
            $table->tinyInteger('pay_type')->default(1)->comment('默认1手机支付');
            $table->tinyInteger('status')->default(1)->comment('订单状态');
            $table->decimal('total',10,2)->default(0.00)->comment('预交金额');
            $table->decimal('return_total',10,2)->default(0.00)->comment('清退金额');
            $table->decimal('social_expenses',10,2)->default(0.00)->comment('社交费用');
            $table->tinyInteger('make_up_type')->default(1)->comment('补缴费用类型1手机支付');
            $table->decimal('actual_amount',10,2)->default(0.00)->comment('实收金额');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('finances');
    }
}
